package cn.edu.jxau.test;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;

import cn.edu.jxau.util.JDBCUtils;
import cn.edu.jxau.util.RandomUtils;

public class Main {

	public static void main(String[] args) throws SQLException {

		System.out.println(add(0, -1));
	}

	public static int add(int a, int b) {

		int sum = 0;
		int carry = 0;
		do {
			sum = a ^ b;
			carry = (a & b) << 1;
			a = sum;
			b = carry;
		} while (b != 0);
		return sum;
	}
}